package com.ruoyi.system.domain;

import java.math.BigDecimal;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 接口字段对象 sys_requests_field
 * 
 * @author yql
 * @date 2023-09-19
 */
public class SysRequestsField extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @NotNull(message = "${comment}不能为空")
    @Range(min = 0,max = Integer.MAX_VALUE,message = "${comment}不符合规范")
    @ApiModelProperty(value = "${comment}",required = true)
    private Long id;

    /** 校验id */
    @NotNull(message = "${comment}不能为空")
    @Range(min = 0,max = Integer.MAX_VALUE,message = "${comment}不符合规范")
    @ApiModelProperty(value = "${comment}",required = true)
    private Long rid;

    /** 字段 */
    @Excel(name = "字段")
    @NotBlank(message = "字段不能为空")
    @Length(max = 255,message = "字段长度不能成功255")
    @ApiModelProperty(value = "字段",required = true)
    private String field;

    /** 名称 */
    @Excel(name = "名称")
    @NotBlank(message = "名称不能为空")
    @Length(max = 255,message = "名称长度不能成功255")
    @ApiModelProperty(value = "名称",required = true)
    private String name;

    /** 类型 */
    @Excel(name = "类型")
    @NotBlank(message = "类型不能为空")
    @Length(max = 255,message = "类型长度不能成功255")
    @ApiModelProperty(value = "类型",required = true)
    private String type;

    /** 正则表达式 */
    @Excel(name = "正则表达式")
    @NotBlank(message = "正则表达式不能为空")
    @Length(max = 255,message = "正则表达式长度不能成功255")
    @ApiModelProperty(value = "正则表达式",required = true)
    private String regular;

    /** 最大长度 */
    @Excel(name = "最大长度")
    @NotNull(message = "最大长度不能为空")
    @Range(min = 0,max = Integer.MAX_VALUE,message = "最大长度不符合规范")
    @ApiModelProperty(value = "最大长度",required = true)
    private Long maxLength;

    /** 最小长度 */
    @Excel(name = "最小长度")
    @NotNull(message = "最小长度不能为空")
    @Range(min = 0,max = Integer.MAX_VALUE,message = "最小长度不符合规范")
    @ApiModelProperty(value = "最小长度",required = true)
    private Long minLength;

    /** 不为空 */
    @Excel(name = "不为空")
    @NotBlank(message = "不为空不能为空")
    @Length(max = 255,message = "不为空长度不能成功255")
    @ApiModelProperty(value = "不为空",required = true)
    private String notNull;

    /** 最小值 */
    @Excel(name = "最小值")
    @NotNull(message = "最小值不能为空")
    @DecimalMin(value = "0.01",message = "最小值不能小于0.01")
    @ApiModelProperty(value = "最小值",required = true)
    private BigDecimal minValue;

    /** 最大值 */
    @Excel(name = "最大值")
    @NotNull(message = "最大值不能为空")
    @DecimalMin(value = "0.01",message = "最大值不能小于0.01")
    @ApiModelProperty(value = "最大值",required = true)
    private BigDecimal maxValue;

    /** 自定义调用方法 */
    @Excel(name = "自定义调用方法")
    @NotBlank(message = "自定义调用方法不能为空")
    @Length(max = 255,message = "自定义调用方法长度不能成功255")
    @ApiModelProperty(value = "自定义调用方法",required = true)
    private String method;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setRid(Long rid) 
    {
        this.rid = rid;
    }

    public Long getRid() 
    {
        return rid;
    }
    public void setField(String field) 
    {
        this.field = field;
    }

    public String getField() 
    {
        return field;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setRegular(String regular) 
    {
        this.regular = regular;
    }

    public String getRegular() 
    {
        return regular;
    }
    public void setMaxLength(Long maxLength) 
    {
        this.maxLength = maxLength;
    }

    public Long getMaxLength() 
    {
        return maxLength;
    }
    public void setMinLength(Long minLength) 
    {
        this.minLength = minLength;
    }

    public Long getMinLength() 
    {
        return minLength;
    }
    public void setNotNull(String notNull) 
    {
        this.notNull = notNull;
    }

    public String getNotNull() 
    {
        return notNull;
    }
    public void setMinValue(BigDecimal minValue) 
    {
        this.minValue = minValue;
    }

    public BigDecimal getMinValue() 
    {
        return minValue;
    }
    public void setMaxValue(BigDecimal maxValue) 
    {
        this.maxValue = maxValue;
    }

    public BigDecimal getMaxValue() 
    {
        return maxValue;
    }
    public void setMethod(String method) 
    {
        this.method = method;
    }

    public String getMethod() 
    {
        return method;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("rid", getRid())
            .append("field", getField())
            .append("name", getName())
            .append("type", getType())
            .append("regular", getRegular())
            .append("maxLength", getMaxLength())
            .append("minLength", getMinLength())
            .append("notNull", getNotNull())
            .append("minValue", getMinValue())
            .append("maxValue", getMaxValue())
            .append("method", getMethod())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
